<!DOCTYPE html>
<head lang="en">
    {% block head %}
    <meta charset="UTF-7">

    {% assets "css_admin" %}
    <link rel="stylesheet" href="{{ ASSET_URL }}" type="text/css" />
    {% endassets %}

    {% assets "js_admin_all" %}
    <script type="text/javascript" src="{{ ASSET_URL }}"></script>
    {% endassets %}
    <title>编辑博客</title>
    {% endblock %}
</head>
<body>
    {% block body_left %}
    <div class="left_container">
        <div class="left_layout">
            <div class="spacer"></div>
            <button title="编辑器设置" id="setting" onclick="admin.setting()">设置</button>
            <button class="span_btn" title="编辑器设置" id="draft_info" onclick="admin.show_draft()">草稿<span id="draft_count">{{draft_count}}</span></button>
            <div class="edit_layout">
                <button title="删除这篇草稿并退出" id="delete" did="{{draft_id}}" onclick="admin.delete_exit(this)">放弃草稿</button>
                <button title="保存草稿并退出" id="exit" onclick="admin.save_exit()">安全退出</button>
                <button title="保存草稿" id="save" onclick="admin.save_blog()">保存草稿</button>
                <button title="删除草稿并发布" id="publish" onclick="admin.publish_blog();">发布博客</button>
            </div>
        </div>
    </div>
    <div id="popup_draft" tabindex="0" class="popup_container">
        <!--<div class="flag"></div>-->
        <div class="popup_back"></div>
        <div class="popup_content">
            <button class="close" onclick="admin.show_draft()">关闭</button>
            <ul id="drafts" class="popup_ul">
                {% for draft in drafts_list %}
                <li class="popup_each">
                    <span>{{ draft.title }}</span>
                    <a href="/admin/edit/draft/{{ draft._id }}">编辑</a>
                    <button did="{{ draft._id }}" onclick="admin.delete_remove(this)">删除</button>
                </li>
                {% endfor %}
            </ul>
        </div>
        <div class="popup">
            <span id="draft_id">{{ draft_id }}</span>
            <span id="blog_id">{{ blog_id }}</span>
        </div>
    </div>
    {% endblock %}
    {% block body_right %}

    {% endblock %}

</body>
</html>